import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/paint',
    name: 'Paint',
    component: () => import('../views/paint.vue'),
    children: [

      {
        path: '/paint/mainWork',
        name: 'MainWork',
        component: () => import('../views/mainWork')
      },
      {
        path: '/paint/work',
        name: 'Work',
        component: () => import('../views/workingCondition')
      },
      {
        path: '/paint/template',
        name: 'Template',
        component: () => import('../views/template.vue')
      },
      {
        path: '/paint/example',
        name: 'Example',
        component: () => import('../views/example.vue')
      }
    ]
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import('../views/login.vue')
  },
  {
    path:'/config',
    name: 'Config',
    component: () => import('../views/config.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router
